<%@ page language="java" contentType="text/html; charset=EUC-KR"
         pageEncoding="EUC-KR"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
        <title>Peacle</title>


        <!-- Free Mobile Template -->
        <!--        <link href="style.css" media="handheld, screen" rel="stylesheet" type="text/css" />-->
        <!--[if IE]><link rel="stylesheet" type="text/css" media="screen, projection" 
                  href="http://www.blueprintcss.org/blueprint/ie.css"><![endif]-->

        <!-- <script type="text/javascript" -->
        <!-- 	src="http://code.jquery.com/jquery-1.4.4.min.js"></script> -->
        <!-- <script type="text/javascript" src="login.js"></script> -->

        <!-- IMPORT CSS       -->
        <link rel="stylesheet" type="text/css" href="default.css" />

        <style type="text/css">
            /* YOU CAN ADD EVERY CSS STYLES HERE !!!! 
                        * I WILL WRAP ALL THIS UP TO ONE CSS FILE LATER
            */
            #login {margin-left: auto;margin-right: auto; width: 480px;}
        </style>



        <script language="javascript" type="text/javascript">
            // <!CDATA[
            
            function Button1_onclick() {
                if (document.userLoginForm.username.value == "")
                    alert("UserName Can Not Be Null!")
                else{ 
                    javascript: userLoginForm.submit()
                    window.open("user.jsp", "_self");
                }
            }
            function Button2_onclick() {
                window.open("userRegistration.jsp", "_self");
            }

            function Button3_onclick() {
                if (document.managerLoginForm.managername.value == "")
                    alert("ManagerName Can Not Be Null!")
                else
                {
                    javascript: managerLoginForm.submit()
					window.open("managermain.jsp","_self");            
                }
            }
            function Button4_onclick() {
                window.open("managerregit.jsp", "_self");
            }
	
            function Button5_onclick() {
                if (document.empLoginForm.managername.value == "")
                    alert("Employee ID Can Not Be Null!")
                else
                {	
                    javascript: empLoginForm.submit()
            		window.open("employeemain.jsp","_self");
                }
            }
            //
        </script>
    </head>
    <body>

        <%-- <%
         String s = "";
         //for(int i = 0; i < personsBean.getPersonsT().size(); i++){
         //s = personsBean.getPersonsT().get(i).getDateOfBirth().toString();
         //out.print(s+"<br>");
                 %> --%>

        <div id="wrapper">
            <div id="header">
                <%@include file="header.html"%>
            </div>
            <div id="container">
                <div class="content min-width min-height">
                    <img alt="Welcome!" src="images/welcome.jpg" /><br/> 
                    Welcome, 
                    <%-- <%    if (session.getAttribute("login") == null) {
                     %>
                     <%
                     //controllers.PersonsJpaController c = new controllers.PersonsJpaController();
                     //out.print(c.getPersonsCount());
                     //c.findPersons(id);
                        //   .find(session.getAttribute("ssn"))).getLastName()%> <br/>
                    --%>
                    <div id="login">
                        <!--User Login Box  -->
                        <form id="userLoginFormId" name="userLoginForm" method="post" >
                            <input type="hidden" name="action" value="userLogin"/>

                            &nbsp;<span style="font-size: 15pt; text-align: center;">USER
                                LOGIN</span>
                            <hr />
                            <br /> &nbsp;<span style="font-size: 10pt; text-align: right">User
                                ID :</span> <input id="Text1" name="username" type="text" /><br /> <br />
                            &nbsp;<span style="font-size: 10pt; text-align: right">Password:</span>

                            <input id="Password1" name="userpasswd" type="password" /><br />

                            <br /> &nbsp; 
                            <input id="Button1" style="width: 70px"
                                   type="button" value="Log In" onclick="Button1_onclick()" />
                            &nbsp; 
                            <input id="Button2" style="width: 70px" type="button"
                                   value="Sign In" onclick="Button2_onclick()" /><br /> <br />
                            <hr />
                        </form>

                        <!-- Manager Login Box -->
                        <form name="managerLoginForm" action="login" method="post">
                            <input type="hidden" name="loginType" value="managerLogin"/>
                            <br /> &nbsp;<span style="font-size: 15pt; text-align: center;">MANAGER
                                LOGIN</span>
                            <hr />
                            <br /> &nbsp;<span style="font-size: 10pt; text-align: right">Manager
                                ID :</span> 
                            <input id="Text1" name="managername" type="text" /><br />
                            <br /> &nbsp;<span style="font-size: 10pt; text-align: right">Password:</span>

                            <input id="Password1" name="managerpasswd" type="password" /><br />
                            <br /> &nbsp; <input id="Button3" style="width: 70px"
                                                 type="button" value="Log In" onclick="Button3_onclick()" />
                            &nbsp; 

                            <input id="Button4" style="width: 70px" type="button"
                                   value="Sign In" onclick="Button4_onclick()" /><br /> <br />
                            <hr />
                        </form>

                        <!-- Employee Login Box -->
                        <form name="employeeLoginForm" action="login" method="post">
                            <input type="hidden" name="loginType" value="employeeLogin"/>
                            <br /> &nbsp;<span style="font-size: 15pt; text-align: center;">EMPLOYEE
                                LOGIN</span>
                            <hr />
                            <br /> &nbsp;<span style="font-size: 10pt; text-align: right">EMPLOYEE
                                ID :</span> <input id="Text1" name="employeename" type="text" /><br />
                            <br /> &nbsp;<span style="font-size: 10pt; text-align: right">Password:</span>
                            <input id="Password1" name="employeepasswd" type="password" /><br />
                            <br /> &nbsp; <input id="Button3" style="width: 70px"
                                                 type="button" value="Log In" onclick="Button5_onclick()" />
                            &nbsp; <br /> <br />
                            <hr />
                        </form>
                    </div> <!-- login end -->
                    <%--<%}
                            else {
                        out.print("testing");
                        }%> --%>


                </div> <!-- content min-height min-width -->
            </div> <!-- container end -->

            <div id="footer">
                <%@include file="footer.jspf"%>
            </div>
        </div> <!-- wrapper end -->


        <!--        <button class="button positive" onclick="goLogin();">
                    <img alt="sign in"
                         src="http://www.blueprintcss.org/blueprint/plugins/buttons/icons/tick.png" />
                    Sign-in
                </button>-->
    </body>
</html>
